Kinetis SDK Demo Applications User Guide  1.0.0-beta
Freescale Semiconductor, Inc.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
shell_autocomplete.c File Reference
#include "shell.h"
#include <string.h>

Functions

static int make_argv (char *s, int argvsz, char *argv[])
 This function parse string into argv[]. More...
 
static int complete_cmdv (int argc, char *const argv[], char last_char, int maxv, char *cmdv[])
 find the available matchs and return possiable match number. More...
 
static void print_argv (const char *banner, const char *leader, const char *sep, int linemax, char *const argv[], uint8_t num)
 print possible matchs More...
 
static int find_common_prefix (char *const argv[], uint8_t num)
 find the number of common characters of matchs. More...
 
int cmd_auto_complete (const char *const prompt, char *buf, uint8_t *np, uint8_t *colp)
 auto complete interface function. More...
 

Variables

static char tmp_buf [SHELL_CB_SIZE]
 

Function Documentation

int cmd_auto_complete ( const char *const  prompt,
char *  buf,
uint8_t *  np,
uint8_t *  colp 
)
static int complete_cmdv ( int  argc,
char *const  argv[],
char  last_char,
int  maxv,
char *  cmdv[] 
)
static
static int find_common_prefix ( char *const  argv[],
uint8_t  num 
)
static
static int make_argv ( char *  s,
int  argvsz,
char *  argv[] 
)
static
static void print_argv ( const char *  banner,
const char *  leader,
const char *  sep,
int  linemax,
char *const  argv[],
uint8_t  num 
)
static

Variable Documentation

char tmp_buf[SHELL_CB_SIZE]
static